#include <QtGui/QApplication>
#include "ivscontroller.h"

IVSController* ivsController;
void onMouse(int event, int x, int y, int flags, void* param);
void selfDestroy();

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    ivsController = new IVSController();
    ivsController->init();

    return a.exec();
}

void onMouse(int event, int x, int y, int flags, void *param)
{
    switch( event ) {
    case CV_EVENT_LBUTTONDOWN:
        ivsController->ROI_add_point(x, y);
        break;

    case CV_EVENT_RBUTTONDOWN:
        ivsController->toogleMakingROI();

    }
}

void selfDestroy(){
    delete ivsController;
}
